

package com.hazelcast.jet.impl.memory;

import com.hazelcast.jet.config.InstanceConfig;

import java.io.Serial;

/**
 * This exception is thrown when a job exceeds a configurable processor accumulation limit.
 *
 * @see InstanceConfig#setMaxProcessorAccumulatedRecords
 */
public class AccumulationLimitExceededException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = 1L;

    public AccumulationLimitExceededException() {
        super("Exception thrown to prevent an OutOfMemoryError on this Hazelcast instance." + " An OOME might occur when a job accumulates large data sets in one of the processors," + " e.g. grouping, sorting, join." + "See InstanceConfig.setMaxProcessorAccumulatedRecords() for further details.");
    }
}
